<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="${pageContext.request.contextPath }/css/editTablestyles.css" />
<script type="text/javascript" src="${pageContext.request.contextPath }/webjars/jquery/1.12.4/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/js/listTable.js"></script>
<script type="text/javascript">
	$(function() {
		$("input[type=button]").click(function() {
			var name=$("input[name=typename]").val();
			
			if(name==""){
				alert("图书类型名称不能为空!");
				return;
			}
			
			
			$("form").attr({"action":"bookType.action?methodName=doAddBook"}).submit();
		})
	})
</script>
</head>
<body>
	<form action="bookType.action?methodName=doAddBook" method="post">
		<table>
			<tr>
				<td colspan="4" class="textarea"><h1>新增图书种类</h1></td>
			</tr>
			<tr>
				<td class="textright">类型名称</td>
				<td class="textleft">
					<input type="text" name="typename"/>
				</td>
			</tr>
			<tr>
				<td colspan="2" align="center">
					<input type="button" value="添加"/>
				</td>
			</tr>
		</table>
	</form>
</body>
</html>